export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
}
export interface SpuData {
  id?: number;
  spuName: string;
  description: string;
  category3Id: number | string;
  tmId: number;
  spuSaleAttrList: null;
  spuImageList: null;
}
export type Records = SpuData[];

export interface SpuResponseData extends ResponseData {
  data: {
    records: Records;
    total: number;
    size: number;
    current: number;
    searchCount: boolean;
    pages: number;
  };
}

// 品牌type
export interface Trademark {
  id: number;
  tmName: string;
  logoUrl: string;
}
// 品牌接口总类型
export interface AllTradeMark extends ResponseData {
  data: Trademark[];
}
// 商品图片ts类型
export interface SpuImg {
  id: number;
  spuId: number;
  imgName: string;
  imgUrl: string;
}
// 已有spu的照片墙类型
export interface SpuHasImg extends SpuImg {
  data: SpuImg[];
}

// 已有的所有spu销售属性(全部)
export interface HasSaleAttr {
  id: number;
  name: string;
}
export interface HasSaleAttrResponseData extends ResponseData {
  data: HasSaleAttr[];
}
// 已有的所有spu销售属性
export interface SaleAtttrValue {
  id: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrValueName: string;
  saleAttrName: string;
  isChecked: null;
}
export type spuSaleAttrValueList = SaleAtttrValue[];
// 销售属性列表对象ts类型
export interface SaleAttr {
  id: number;
  spuId: number;
  baseSaleAttrId: number;
  saleAttrName: string;
  spuSaleAttrValueList: spuSaleAttrValueList;
}
export interface spuSaleAttResponseData extends ResponseData {
  data: SaleAttr[];
}
// sku平台属性收集
export interface Attr {
  attrId: number | string; //平台属性的ID
  valueId: number | string; //属性值的ID
}
// su销售属性
export interface saleArr {
  saleAttrId: number | string; //属性ID
  saleAttrValueId: number | string; //属性值的ID
}
// sku 返回数据
export interface SkuData {
  category3Id: string | number; //三级分类的ID
  spuId: string | number; //已有的SPU的ID
  tmId: string | number; //SPU品牌的ID
  skuName: string; //sku名字
  price: string | number; //sku价格
  weight: string | number; //sku重量
  skuDesc: string; //sku的描述
  skuAttrValueList?: Attr[];
  skuSaleAttrValueList?: saleArr[];
  skuDefaultImg: string; //sku图片地址
}
//获取SKU数据接口的ts类型
export interface SkuInfoData extends ResponseData {
  data: SkuData[];
}
